/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.framework;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import java.lang.ref.WeakReference;
import org.json.JSONObject;

final class h extends Handler {
    WeakReference a;
    HttpLoaderCallback b;

    h(HttpLoaderCallback paramHttpLoaderCallback, HttpCreater paramHttpCreater) {
        this.a = new WeakReference(paramHttpCreater);
        this.b = paramHttpLoaderCallback;
    }

    public final void handleMessage(Message paramMessage) {
        if ((HttpCreater) this.a.get() == null)
            LogUtil.d(HttpCreater.access$000(), "the class is done");
        int i = (paramMessage = paramMessage.getData()).getInt("state");
        if ((paramMessage = paramMessage.getString("json")) == null) {
            this.b.callback(i, null);
            return;
        }
        JSONObject localJSONObject = null;
        try {
            localJSONObject = new JSONObject(paramMessage);
        } catch (org.json.JSONException paramMessage) {
            LogUtil.e(HttpCreater.access$000(), "JSONException", paramMessage);
        }
        this.b.callback(i, localJSONObject);
    }
}